﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace GiaoDien
{
    public partial class DangNhap : Form
    {
        public DangNhap()
        {
            InitializeComponent();
        }

        private void btnDN_Click(object sender, EventArgs e)
        {
            if (txtTenDN.Text == "user" || txtMK.Text == "1234 ")
            {
                TraCuu st1 = new TraCuu();
                st1.Show();
                Hide();
            }
            else
            {

                if (txtTenDN.Text == "admin" || txtMK.Text == "1234 ")
                {
                    ManHinhChinh st1 = new ManHinhChinh();
                    st1.Show();
                    Hide();

                }
                else
                {
                    if (txtTenDN.Text != "admin" || txtMK.Text != "1234 ")
                    {

                        MessageBox.Show("Tên đăng nhập hay mật khẩu không đúng");
                    }
                }
            }
             
        }

        private void btnThoat_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
